module necrophilia.skeleton.DataNodes;
import necrophilia.helpers.ListArray;
import maths.CoordSys;

alias ListArray!(CoordSys) CoordArray;

struct CoordDump{
	private CoordArray _animations;
	private CoordArray _positions;
	
	void setSize(uint i){
		_animations.setSize(i);
		_positions.setSize(i);
	}
	
	int getSize(){
		return _animations.max;
	}
	
	int getLen(){
		return _animations.length;
	}
	
	void reset(){
		_animations.reset;
		_positions.reset;
	}
	
	CoordSys[] animations(){
		return _animations.get;
	}
	
	CoordSys[] positions(){
		return _positions.get;
	}
	
	CoordSys[] getMove(){
		if(_animations.get.length==0 && _positions.get.length==0) assert(false);
		if(_animations.get.length==0) return _positions.get;
			else return _animations.get;
	}
	
	void dumpCoord(CoordSys c, bool isAnimation){
		if(isAnimation)_animations.add(c);
			else _positions.add(c);
	}
}

import std.stdio;